package mysql_utils

import (
	_ "fmt"
)

type MongodbConnectionIpInfo struct {
	InstanceId      string `gorm:"column:instance"`
	TimeVersion     string `gorm:"column:time_version"`
	ConnectIp       string `gorm:"column:ip"`
	ConnectionCount int    `gorm:"column:connection_count"`
	MongoRole       string `gorm:"column:mongo_role"`
}

func (u MongodbConnectionIpInfo) TableName() string {
	//绑定MYSQL表名为users
	return "mongodb_connection_ip_info"
}

func MongodbConnectionIpInfoCreate(mongoConnectInfoList *[]MongodbConnectionIpInfo) {
	gormDb = GetDBInstanceGorm()
	gormDb.Create(mongoConnectInfoList)
}
